#include <stdio.h>
int c(int n,int k);
int main(){
	int n=0,k=1;
	printf("1\n");
	for ( n=2;n<=10;n++ ){
		for ( k=0;k<=n;k++ ){
			printf("%d\t",c(n,k));
		}printf("\n");
	}
}

int c(int n,int k){
	int ret=1,i=k,m=1;
	if (k==0 || n==k){
		return ret;
	}
	for ( ;i;i--){
		ret*=(n-i+1);
		m*=i;
	}
	return ret/m;
}
